﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExcelTools
{
	/// <summary>
	/// Represents a sheet from an Excel workbook.
	/// </summary>
	public class ExcelSheet
	{
		#region Private Fields

		/// <summary>
		/// The rows in the spreadsheet.
		/// </summary>
		private List<ExcelRow> mRows = new List<ExcelRow>();

		/// <summary>
		/// The name of the sheet.
		/// </summary>
		private string mName = null;

		/// <summary>
		/// The columns of the sheet.
		/// </summary>
		private List<ExcelColumn> mColumns = new List<ExcelColumn>();

		#endregion

		#region Public Properties

		/// <summary>
		/// The rows in the spreadsheet.
		/// </summary>
		public List<ExcelRow> Rows 
		{ 
			get
			{
				return mRows;
			}
		}

		/// <summary>
		/// Gets the name of the sheet.
		/// </summary>
		public string Name 
		{
			get
			{
				return mName;
			}
		}

		/// <summary>
		/// The columns of the sheet.
		/// </summary>
		public List<ExcelColumn> Columns
		{
			get
			{
				return mColumns;
			}
		}

		#endregion

		#region Public Constructors

		/// <summary>
		/// Creates a sheet with the specified name.
		/// </summary>
		/// <param name="name"></param>
		public ExcelSheet(string name)
		{
			mName = name;
		}

		#endregion
	}
}
